<template>
  <div class="card-container">
    <a-tabs type="card" @change="onTabs">
      <!-- <a-tab-pane v-if="routerShow($route,'alarm_list')" tab="报警联系人" :key="1">
        <single v-if="tabsBool1"></single>
      </a-tab-pane> -->
      <a-tab-pane v-if="routerShow($route,'alarmGroup_list')" tab="报警联系组" :key="2">
        <Group v-if="tabsBool2"></Group>
      </a-tab-pane>
      <!-- <a-tab-pane tab="信息简报联系人" :key="3">
        <Briefing v-if="tabsBool3"></Briefing>
      </a-tab-pane> -->
    </a-tabs>
  </div>
</template>
<script>

  import {
    Single,
    Group,
    Briefing
  } from './components';
  export default {
    name: "Contacts",
    components: {
      Single,
      Group,
      Briefing
    },
    data() {
      return {
        tabsBool1: true,
        tabsBool2: true,
        tabsBool3: true,
      }
    },

    mounted() {
    },
    methods: {
      onTabs(idx) {
        if(idx == 1) {
          this.tabsBool1 = false
          this.$nextTick(() => (this.tabsBool1 = true))
        } else if(idx == 2){
          this.tabsBool2 = false
          this.$nextTick(() => (this.tabsBool2 = true))
        } else {
          this.tabsBool3 = false
          this.$nextTick(() => (this.tabsBool3 = true))
        }
      }
    }
  }
</script>

<style scoped>

</style>
